export default {
    state:{
        ajax_loading:false
    },actions:{
        global_show_loading:function({commit}){
            return new Promise((resolve,reject) =>{
                commit('global_show_loading')
                resolve();
            });
        },
        global_hide_loading:function({commit}){
            return new Promise((resolve,reject) =>{
                commit('global_hide_loading')
                resolve();
            });
        }
    },mutations:{
        global_show_loading:function(state,item){
            state.ajax_loading=true
        },
        global_hide_loading:function(state,item){
            state.ajax_loading=false
        },
    },getters:{
        getLoading:(state)=>{
            return state.ajax_loading;
        }
    }
}